home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir36 / dedate20.zip / DEDATE.DOC next >
Text File  |  1989-08-24  |  5KB  |  114 lines

  1.  
  2.                                DEDATE v2.00
  3.                  A Year/Month/Day DOS errorlevel utility.
  4.                             (C) Copyright 1989
  5.                             Lefteris Tsintzelis
  6.                                Brooklyn, NY
  7.                             ALL RIGHTS RESERVED.
  8.  
  9.                       This program is released to the
  10.                     public domain, and distribution is
  11.                          permitted and encouraged.
  12.                   However, if you wish to continue using
  13.                this program for more than 21 days then a fee
  14.                    of $20 or more is strongly suggested.
  15.  
  16.                                 DESCRIPTION
  17.  
  18.      DEDATE is a small utility program that returns DOS errorlevels on a
  19. specific date. Its use is for batch files. You can very well use this program
  20. to execute other programs on a specific day of the week or of the month or
  21. even the year. You can use it for your AUTOEXEC.BAT to back up your hard disk
  22. every Sunday or to optimize your hard disk every Friday. I wrote this program
  23. because I run a bulletin board system and want to optimize my hard disk every
  24. Sunday automatically. Since there was no other program that I could use from
  25. batch files I decided to write one. This is actually my very first program
  26. so your opinion will count.
  27.  
  28.                                    USAGE
  29.  
  30.      Here is a sample of a batch file that would back up your hard disk every
  31. Friday:
  32.  
  33. echo off
  34. ...
  35. REM Backup my hard disk automatically on boot up every Friday.
  36. dedate -w5 -e1
  37. if errorlevel 1 goto back_up
  38. :back_up
  39. backup c:
  40. REM Set DOS erroelevel to 0.
  41. dedate -e0
  42. ...
  43.  
  44.      Another example of a batch file to back up your hard disk every
  45. Sunday and optimize it the 1st of every month would look like:
  46.  
  47. echo off
  48. ...
  49. REM Back up hard disk if Sunday
  50. dedate -w0 -e1
  51. if errorlevel 1 backup c:
  52. REM Optimize hard disk if 1st of every month
  53. dedate -d1 -e1
  54. if errorlevel 1 optimize c:
  55. REM Reset DOS errorlevel to 0
  56. dedate -e0
  57. ...
  58.  
  59.      The available commands are:  -y<1980 to 2099>
  60.                                   -m<1 to 12>
  61.                                   -d<1 to 31> depending on month and year.
  62.                                   -w<0 to 6> Sunday to Saturday respectively.
  63.                                   -e<0 to 9> DOS errorlevel.
  64.  
  65.      The correct syntax is: DEDATE -yYYYY -mMM -dDD -wW -eE.
  66.  
  67.      The order of the parameters does not really matter as long as they are
  68. in SMALL CASE. if you type "DEDATE -W2 -E4" then you will get a parameter
  69. error warning you. You can always refresh your memory with the available
  70. commands by just typing "DEDATE". All parameters default to your current
  71. machine settings if they are not specified. For example, if you don't
  72. specify the errorlevel (-eE) then it will automatically default to 0. If you
  73. don't specify the year (-yYYYY) it will automatically default to the current
  74. year; same with month (-mMM), day (-dDD), and day of the week (-wW). So, if
  75. you just type "DEDATE -e9" the program will exit with DOS errorlevel 9. If
  76. you enter an invalid or out of range parameter then you will get a warning
  77. message and the program will halt with DOS errorlevel 0.
  78.  
  79.      "DEDATE -e4 -y1989 -m2 -d29" is not valid for a simple reason: February
  80. does NOT have 29 days the year 1989! However, "DEDATE -e4 -y1988 -m2 -d29"
  81. IS a valid option. "DEDATE -e1 -d31 -m4" is NOT valid because April does not
  82. have 31 days. In any case, if you get an error message then you are probably
  83. doing something wrong or you entering an out of range parameter.
  84.  
  85.      As you see, the error checking is very strict so there is no danger of
  86. entering a wrong day. You can use your imagination and a good manual that
  87. explains errorlevels and batch files and create a fully automatic system
  88. since I will not explain the errorlevels in full detail. As for creating
  89. batch files (you probably already know how) you can use a simple text
  90. editor and of course your DOS manual.
  91.  
  92. And of course:
  93.  
  94.      I make no guarantee that this program will work in your machine. It
  95. has been tested in an 8088, 80286 and 80386 based computers and worked
  96. flawlessly. The requirements is a fully IBM (TM) XT compatible machine. Of
  97. course, I am not to be help responsible for any kind of data loss that may
  98. arise from the use or misuse of this program (if any, since this program
  99. does not access anything particular but your system's date).
  100.  
  101. If you have any comments, problems or suggestions, please forward them to:
  102.  
  103.                     Lefteris Tsintzelis
  104.                     18 Bowery, MCC #71
  105.                     New York, NY 10013-5101
  106.  
  107. or you can leave a message on Olympic BBS where you can also find the latest
  108. version of DEDATE.
  109.  
  110.             Data Tel. #1: (718) 252-0534 Hayes V9600 - Public
  111.             Data Tel. #2: (718) 252-7514 USR Courier 9600 - Private
  112.  
  113.                     SysOp: Lefteris Tsintzelis.
  114.